﻿using System;
using System.Collections.Generic;
using System.Text;
using Pixysoft.Framework.Reflection;
using Pixysoft.Weblications.Sango.Dao;
using Pixysoft.Weblications.Sango.Formular;

namespace Pixysoft.Weblications.Sango.Command.equipment
{
    partial class SangoEquipmentHandler
    {
        public eqm_successrate eqm_successrate()
        {
            string userCode = SangoManager.Authentication();

            eqm_successrate response = ReflectionManager.CreatePojo<eqm_successrate>();
            response.Succeed = false;

            Entities.Usr_Profile profile = UsrProfileDao.getUsrProfile(userCode);
            response.successrate = EquipmentDao.getSuccessRate(profile.Userlevel);
            response.trend = EquipmentFormular.getSucceedTrend();

            response.Succeed = true;
            return response;
        }
    }

    public interface eqm_successrate : ISangoResponse
    {
        long successrate { get;set;}
        bool trend { get;set;}
    }
}
